<?xml version="1.0" encoding="UTF-8" ?>
<?oracle-xsl-mapper
  <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
  <mapSources>
    <source type="XSD">
      <schema location="../xsd/get_pre_approved_table.xsd"/>
      <rootElement name="PrecreditoffersCollection" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/get_pre_approved"/>
    </source>
  </mapSources>
  <mapTargets>
    <target type="XSD">
      <schema location="../xsd/insert_credit_card_table.xsd"/>
      <rootElement name="CreditcardCollection" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/insert_credit_card"/>
    </target>
  </mapTargets>
  <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.5.0(build 110418.1550.0174) AT [WED DEC 31 15:27:35 PST 2014]. -->
?>
<xsl:stylesheet version="1.0"
                xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
                xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
                xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
                xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
                xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
                xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
                xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/top/insert_credit_card"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:med="http://schemas.oracle.com/mediator/xpath"
                xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
                xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
                xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
                xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
                xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/top/get_pre_approved"
                xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                xmlns:ora="http://schemas.oracle.com/xpath/extension"
                xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
                xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
                exclude-result-prefixes="xsi xsl ns0 xsd ns1 bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref ora socket ldap">
  <xsl:template match="/">
    <ns1:CreditcardCollection>
      <ns1:Creditcard>
        <ns1:creditcardnumber>
           <xsl:value-of select="oraext:sequence-next-val('credit_seq','jdbc/SOADataSource')"/>
        </ns1:creditcardnumber>
        <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:lastname">
          <ns1:lastname>
            <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:lastname/@xsi:nil">
              <xsl:attribute name="xsi:nil">
                <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:lastname/@xsi:nil"/>
              </xsl:attribute>
            </xsl:if>
            <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:lastname"/>
          </ns1:lastname>
        </xsl:if>
        <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:firstname">
          <ns1:firstname>
            <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:firstname/@xsi:nil">
              <xsl:attribute name="xsi:nil">
                <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:firstname/@xsi:nil"/>
              </xsl:attribute>
            </xsl:if>
            <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:firstname"/>
          </ns1:firstname>
        </xsl:if>
        <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:address">
          <ns1:address>
            <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:address/@xsi:nil">
              <xsl:attribute name="xsi:nil">
                <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:address/@xsi:nil"/>
              </xsl:attribute>
            </xsl:if>
            <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:address"/>
          </ns1:address>
        </xsl:if>
        <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:city">
          <ns1:city>
            <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:city/@xsi:nil">
              <xsl:attribute name="xsi:nil">
                <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:city/@xsi:nil"/>
              </xsl:attribute>
            </xsl:if>
            <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:city"/>
          </ns1:city>
        </xsl:if>
        <ns1:state>
          <xsl:text disable-output-escaping="no"></xsl:text>
        </ns1:state>
        <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:zipcode">
          <ns1:zipcode>
            <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:zipcode/@xsi:nil">
              <xsl:attribute name="xsi:nil">
                <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:zipcode/@xsi:nil"/>
              </xsl:attribute>
            </xsl:if>
            <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:zipcode"/>
          </ns1:zipcode>
        </xsl:if>
        <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:country">
          <ns1:country>
            <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:country/@xsi:nil">
              <xsl:attribute name="xsi:nil">
                <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:country/@xsi:nil"/>
              </xsl:attribute>
            </xsl:if>
            <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:country"/>
          </ns1:country>
        </xsl:if>
        <ns1:ssn>
          <xsl:text disable-output-escaping="no"></xsl:text>
        </ns1:ssn>
        <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:creditcardlimit">
          <ns1:creditLimit>
            <xsl:if test="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:creditcardlimit/@xsi:nil">
              <xsl:attribute name="xsi:nil">
                <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:creditcardlimit/@xsi:nil"/>
              </xsl:attribute>
            </xsl:if>
            <xsl:value-of select="/ns0:PrecreditoffersCollection/ns0:Precreditoffers/ns0:creditcardlimit"/>
          </ns1:creditLimit>
        </xsl:if>
        <ns1:creditCardType>
          <xsl:text disable-output-escaping="no">Gold</xsl:text>
        </ns1:creditCardType>
      </ns1:Creditcard>
    </ns1:CreditcardCollection>
  </xsl:template>
</xsl:stylesheet>
